Optimal. Leaf size=104 \[ -\frac {a \text {ArcTan}(\sinh (c+d x))}{\left (a^2+b^2\right ) d}-\frac {\text {csch}(c+d x)}{a d}+\frac {b \log (\cosh (c+d x))}{\left (a^2+b^2\right ) d}-\frac {b \log (\sinh (c+d x))}{a^2 d}+\frac {b^3 \log (a+b \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 104, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2916, 12, 908,
649, 209, 266} \begin {gather*} -\frac {a \text {ArcTan}(\sinh (c+d x))}{d \left (a^2+b^2\right )}+\frac {b \log (\cosh (c+d x))}{d \left (a^2+b^2\right )}+\frac {b^3 \log (a+b \sinh (c+d x))}{a^2 d \left (a^2+b^2\right )}-\frac {b \log (\sinh (c+d x))}{a^2 d}-\frac {\text {csch}(c+d x)}{a d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 209
Rule 266
Rule 649
Rule 908
Rule 2916
Rubi steps
\begin {align*} \int \frac {\text {csch}^2(c+d x) \text {sech}(c+d x)}{a+b \sinh (c+d x)} \, dx &=-\frac {b \text {Subst}\left (\int \frac {b^2}{x^2 (a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (c+d x)\right )}{d}\\ &=-\frac {b^3 \text {Subst}\left (\int \frac {1}{x^2 (a+x) \left (-b^2-x^2\right )} \, dx,x,b \sinh (c+d x)\right )}{d}\\ &=-\frac {b^3 \text {Subst}\left (\int \left (-\frac {1}{a b^2 x^2}+\frac {1}{a^2 b^2 x}-\frac {1}{a^2 \left (a^2+b^2\right ) (a+x)}+\frac {a-x}{b^2 \left (a^2+b^2\right ) \left (b^2+x^2\right )}\right ) \, dx,x,b \sinh (c+d x)\right )}{d}\\ &=-\frac {\text {csch}(c+d x)}{a d}-\frac {b \log (\sinh (c+d x))}{a^2 d}+\frac {b^3 \log (a+b \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}-\frac {b \text {Subst}\left (\int \frac {a-x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}\\ &=-\frac {\text {csch}(c+d x)}{a d}-\frac {b \log (\sinh (c+d x))}{a^2 d}+\frac {b^3 \log (a+b \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}+\frac {b \text {Subst}\left (\int \frac {x}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}-\frac {(a b) \text {Subst}\left (\int \frac {1}{b^2+x^2} \, dx,x,b \sinh (c+d x)\right )}{\left (a^2+b^2\right ) d}\\ &=-\frac {a \tan ^{-1}(\sinh (c+d x))}{\left (a^2+b^2\right ) d}-\frac {\text {csch}(c+d x)}{a d}+\frac {b \log (\cosh (c+d x))}{\left (a^2+b^2\right ) d}-\frac {b \log (\sinh (c+d x))}{a^2 d}+\frac {b^3 \log (a+b \sinh (c+d x))}{a^2 \left (a^2+b^2\right ) d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.49, size = 160, normalized size = 1.54 \begin {gather*} -\frac {b^3 \left (\frac {\text {csch}(c+d x)}{a b^3}+\frac {\log (\sinh (c+d x))}{a^2 b^2}-\frac {\left (b^2+a \sqrt {-b^2}\right ) \log \left (\sqrt {-b^2}-b \sinh (c+d x)\right )}{2 b^4 \left (a^2+b^2\right )}-\frac {\log (a+b \sinh (c+d x))}{a^2 \left (a^2+b^2\right )}-\frac {\left (1+\frac {a}{\sqrt {-b^2}}\right ) \log \left (\sqrt {-b^2}+b \sinh (c+d x)\right )}{2 b^2 \left (a^2+b^2\right )}\right )}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.54, size = 140, normalized size = 1.35
method | result | size |
derivativedivides | \(\frac {\frac {2 b \ln \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-4 a \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a^{2}+2 b^{2}}+\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {b \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}+\frac {b^{3} \ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{a^{2} \left (a^{2}+b^{2}\right )}}{d}\) | \(140\) |
default | \(\frac {\frac {2 b \ln \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-4 a \arctan \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 a^{2}+2 b^{2}}+\frac {\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 a}-\frac {1}{2 a \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}-\frac {b \ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2}}+\frac {b^{3} \ln \left (a \left (\tanh ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-2 b \tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{a^{2} \left (a^{2}+b^{2}\right )}}{d}\) | \(140\) |
risch | \(-\frac {2 b \,d^{2} x}{a^{2} d^{2}+b^{2} d^{2}}-\frac {2 b d c}{a^{2} d^{2}+b^{2} d^{2}}-\frac {2 b^{3} x}{a^{2} \left (a^{2}+b^{2}\right )}-\frac {2 b^{3} c}{a^{2} d \left (a^{2}+b^{2}\right )}+\frac {2 b x}{a^{2}}+\frac {2 b c}{a^{2} d}-\frac {2 \,{\mathrm e}^{d x +c}}{d a \left ({\mathrm e}^{2 d x +2 c}-1\right )}+\frac {i \ln \left ({\mathrm e}^{d x +c}-i\right ) a}{\left (a^{2}+b^{2}\right ) d}+\frac {\ln \left ({\mathrm e}^{d x +c}-i\right ) b}{\left (a^{2}+b^{2}\right ) d}-\frac {i \ln \left ({\mathrm e}^{d x +c}+i\right ) a}{\left (a^{2}+b^{2}\right ) d}+\frac {\ln \left ({\mathrm e}^{d x +c}+i\right ) b}{\left (a^{2}+b^{2}\right ) d}+\frac {b^{3} \ln \left ({\mathrm e}^{2 d x +2 c}+\frac {2 a \,{\mathrm e}^{d x +c}}{b}-1\right )}{a^{2} d \left (a^{2}+b^{2}\right )}-\frac {b \ln \left ({\mathrm e}^{2 d x +2 c}-1\right )}{a^{2} d}\) | \(295\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.48, size = 173, normalized size = 1.66 \begin {gather*} \frac {b^{3} \log \left (-2 \, a e^{\left (-d x - c\right )} + b e^{\left (-2 \, d x - 2 \, c\right )} - b\right )}{{\left (a^{4} + a^{2} b^{2}\right )} d} + \frac {2 \, a \arctan \left (e^{\left (-d x - c\right )}\right )}{{\left (a^{2} + b^{2}\right )} d} + \frac {b \log \left (e^{\left (-2 \, d x - 2 \, c\right )} + 1\right )}{{\left (a^{2} + b^{2}\right )} d} + \frac {2 \, e^{\left (-d x - c\right )}}{{\left (a e^{\left (-2 \, d x - 2 \, c\right )} - a\right )} d} - \frac {b \log \left (e^{\left (-d x - c\right )} + 1\right )}{a^{2} d} - \frac {b \log \left (e^{\left (-d x - c\right )} - 1\right )}{a^{2} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 441 vs.
\(2 (104) = 208\).
time = 0.43, size = 441, normalized size = 4.24 \begin {gather*} -\frac {2 \, {\left (a^{3} \cosh \left (d x + c\right )^{2} + 2 \, a^{3} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a^{3} \sinh \left (d x + c\right )^{2} - a^{3}\right )} \arctan \left (\cosh \left (d x + c\right ) + \sinh \left (d x + c\right )\right ) + 2 \, {\left (a^{3} + a b^{2}\right )} \cosh \left (d x + c\right ) - {\left (b^{3} \cosh \left (d x + c\right )^{2} + 2 \, b^{3} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + b^{3} \sinh \left (d x + c\right )^{2} - b^{3}\right )} \log \left (\frac {2 \, {\left (b \sinh \left (d x + c\right ) + a\right )}}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) - {\left (a^{2} b \cosh \left (d x + c\right )^{2} + 2 \, a^{2} b \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + a^{2} b \sinh \left (d x + c\right )^{2} - a^{2} b\right )} \log \left (\frac {2 \, \cosh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) - {\left (a^{2} b + b^{3} - {\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right )^{2} - 2 \, {\left (a^{2} b + b^{3}\right )} \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) - {\left (a^{2} b + b^{3}\right )} \sinh \left (d x + c\right )^{2}\right )} \log \left (\frac {2 \, \sinh \left (d x + c\right )}{\cosh \left (d x + c\right ) - \sinh \left (d x + c\right )}\right ) + 2 \, {\left (a^{3} + a b^{2}\right )} \sinh \left (d x + c\right )}{{\left (a^{4} + a^{2} b^{2}\right )} d \cosh \left (d x + c\right )^{2} + 2 \, {\left (a^{4} + a^{2} b^{2}\right )} d \cosh \left (d x + c\right ) \sinh \left (d x + c\right ) + {\left (a^{4} + a^{2} b^{2}\right )} d \sinh \left (d x + c\right )^{2} - {\left (a^{4} + a^{2} b^{2}\right )} d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\operatorname {csch}^{2}{\left (c + d x \right )} \operatorname {sech}{\left (c + d x \right )}}{a + b \sinh {\left (c + d x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 200, normalized size = 1.92 \begin {gather*} \frac {\frac {2 \, b^{4} \log \left ({\left | b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} + 2 \, a \right |}\right )}{a^{4} b + a^{2} b^{3}} - \frac {{\left (\pi + 2 \, \arctan \left (\frac {1}{2} \, {\left (e^{\left (2 \, d x + 2 \, c\right )} - 1\right )} e^{\left (-d x - c\right )}\right )\right )} a}{a^{2} + b^{2}} + \frac {b \log \left ({\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}^{2} + 4\right )}{a^{2} + b^{2}} - \frac {2 \, b \log \left ({\left | e^{\left (d x + c\right )} - e^{\left (-d x - c\right )} \right |}\right )}{a^{2}} + \frac {2 \, {\left (b {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )} - 2 \, a\right )}}{a^{2} {\left (e^{\left (d x + c\right )} - e^{\left (-d x - c\right )}\right )}}}{2 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.87, size = 142, normalized size = 1.37 \begin {gather*} \frac {\ln \left ({\mathrm {e}}^{c+d\,x}+1{}\mathrm {i}\right )}{b\,d+a\,d\,1{}\mathrm {i}}+\frac {b^3\,\ln \left (2\,a\,{\mathrm {e}}^{c+d\,x}-b+b\,{\mathrm {e}}^{2\,c+2\,d\,x}\right )}{d\,a^4+d\,a^2\,b^2}-\frac {2\,{\mathrm {e}}^{c+d\,x}}{a\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}-\frac {b\,\ln \left ({\mathrm {e}}^{2\,c+2\,d\,x}-1\right )}{a^2\,d}+\frac {\ln \left (1+{\mathrm {e}}^{c+d\,x}\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{a\,d+b\,d\,1{}\mathrm {i}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________